Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: remove unneeded files from packages' production builds. #22498

Merged
merged 5 commits into from
Jan 27, 2022

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Jan 26, 2022

Changes proposed in this Pull Request:

  • This should ensure that we do not ship unneeded files in production builds of some of our packages.

Jetpack product discussion

  • N/A

Does this pull request change what data or activity we track or use?

  • No

Testing instructions:

  • Check that the added files are files that are not needed in a production build.

@jeherve jeherve requested a review from a team as a code owner January 26, 2022 08:51
@jeherve jeherve added [Pri] Low [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Type] Janitorial labels Jan 26, 2022
@jeherve jeherve self-assigned this Jan 26, 2022
Comment on lines -22 to +26
/src/**/*.[jt]s?(x) production-exclude
/src/**/*.js production-exclude
/src/**/*.jsx production-exclude
/src/**/*.ts production-exclude
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've switched to more explicit declarations here because the pattern does not seem to work:
https://github.com/Automattic/jetpack-search/tree/e408700a61a7937263cdb48320acc91def69a95d/src/customberg

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ?(x) bit isn't a supported part of the syntax.

@github-actions github-actions bot added [Package] Assets [Package] Jitm [Package] My Jetpack [Package] Post List [Package] Search Contains core Search functionality for Jetpack and Search plugins [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Jan 26, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: February 1, 2022.
  • Scheduled code freeze: January 24, 2022.

@jeherve jeherve added Instant Search [Feature] Search For all things related to Search labels Jan 26, 2022
Copy link
Contributor

@anomiex anomiex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some version bumps are needed. Otherwise looks sensible to me.

Comment on lines -22 to +26
/src/**/*.[jt]s?(x) production-exclude
/src/**/*.js production-exclude
/src/**/*.jsx production-exclude
/src/**/*.ts production-exclude
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ?(x) bit isn't a supported part of the syntax.

@anomiex anomiex added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jan 26, 2022
@jeherve jeherve added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Jan 27, 2022
anomiex
anomiex previously approved these changes Jan 27, 2022
@anomiex anomiex added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jan 27, 2022
@jeherve jeherve removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Jan 27, 2022
@kraftbj kraftbj enabled auto-merge (squash) January 27, 2022 20:55
auto-merge was automatically disabled January 27, 2022 20:59

Pull Request is not mergeable

@kraftbj kraftbj merged commit 99b0acc into master Jan 27, 2022
@kraftbj kraftbj deleted the update/ignored-files-packages branch January 27, 2022 21:51
@github-actions github-actions bot added this to the jetpack/10.6 milestone Jan 27, 2022
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jan 27, 2022
@jeherve jeherve modified the milestones: jetpack/10.6, jetpack/10.7 Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Search For all things related to Search [Package] Assets [Package] Jitm [Package] My Jetpack [Package] Post List [Package] Search Contains core Search functionality for Jetpack and Search plugins [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Low [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants